package org.example.springcloud.feign;

import feign.Param;
import feign.RequestLine;
import org.example.config.FeignClient01Config;
import org.example.springcloud.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "provider-user",configuration = FeignClient01Config.class)
public interface FeignClient01 {
//    @GetMapping("/user/{id}")
    @RequestLine("GET /user/{id}")
    User getOrder(@Param("id") long id); //使用RequestLine时，必须使用Param注解
}
